<template>
  <div class="dialog" v-show="showDialog">
    <div class="content" :style="{ width: width + 'rem', height: height + 'rem' }">
      <slot name="content" />
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'FLDialog',
  props: {
    showDialog: {
      type: Boolean,
      default: false
    },
    width: {
      type: Number,
      default: 40
    },
    height: {
      type: Number,
      default: 22
    }
  }
})
</script>

<style lang="stylus" scoped>
  .dialog {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #29252636;
  border-radius 1.5rem 0 0 0
  z-index: 2;
}
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-60%, -75%);
  background-color: #ffffff;
  border-radius: 25px;
  text-align: center;
}
</style>
